<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>用户登录</title>
    <link rel="stylesheet" type="text/css" href="CSS/all.css"  th:href="@{/CSS/all.css}"/>
    <link rel="stylesheet" type="text/css" href="CSS/login.css"  th:href="@{/CSS/login.css}"/>
     
</head>
<body>
        <header>
            <!--<a onclick="goback()">&lt;</a>-->
            <div style="position: absolute;padding: 0 10px;height: 28px;margin: 0px 10px;line-height: 28px;font-size: 14px;background-color: #65bbec;border-radius: 3px;width: 30px;    top: calc((100% - 28px) / 2);">
                <a onclick="goback()" style="color: #fff;">返回</a>
            </div>
                用户登录
            <div style="    color: #fff;position: absolute;padding: 0 10px;width: 30px;height: 28px;margin: 0px 10px;line-height: 28px;text-align: center;border-radius: 3px;right: 0;top: 0;font-size: 14px;background-color: #65bbec;    top: calc((100% - 28px) / 2);">
                <a th:href="@{/Story/getAllCategoryStoryList(isLogin='')}" style="color: #fff;">首页</a>
            </div>
        </header>
        <form action="#" th:action="@{/admin/login}" th:object="${user}" method="post">
            <label th:text="${success}" style="color: red"></label>
            <div>
                <label style="color: #6d6c75;" >账号:</label><input type="text" maxlength="16" required th:field="*{username}"/>
            </div>
            <div>

                <label style="color:#6d6c75;" >密码:</label><input type="password" maxlength="16" required th:field="*{password}"/>
            </div>
            <label th:text="${error}" style="color: red;font-size: 14px;float: left;margin-left: 85px;margin-top: -20px;" ></label>
                <input type="submit" value="登录" style="margin-top: 20px;" />
            <input type="button" value="没有账号?点击注册"  onclick="goreg()" />
        </form>
</body>
</html>
<script>

        function goback(){
            history.back(-1);
        }
        function goreg(){

            location.href='/admin/reg'
        }
    </script>